package com.lagou.model;

import java.util.List;

/**

 * TODO: 实现消息信息的封装

 */
public class UserMessage implements java.io.Serializable{
    private static final long serialVersionUID = -4729638835655094399L;

    /**
     * 消息的类型代表具体的业务
     */
    private String type;
    /**
     * 消息的具体内容
     */
    private User user;
    /**
     * 考题
     */
    private Question question;
    /**
     * 抽取的所有考题
     */
    private List<Question> testPaper;
    /**
     * 每次作答的答案列表
     */
    private List<String> answerList;
    /**
     * 成绩数据的字符数组
     */
    private char[] storeData;

    public UserMessage() {
    }

    public UserMessage(String type) {
        this.type = type;
    }

    public UserMessage(String type, User user) {
        this.type = type;
        this.user = user;
    }

    public UserMessage(String type, Question question) {
        this.type = type;
        this.question = question;
    }

    public UserMessage(String type, List<Question> testPaper) {
        this.type = type;
        this.testPaper = testPaper;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Question getQuestion() {
        return question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }

    public List<Question> getTestPaper() {
        return testPaper;
    }

    public void setTestPaper(List<Question> testPaper) {
        this.testPaper = testPaper;
    }

    public List<String> getAnswerList() {
        return answerList;
    }

    public void setAnswerList(List<String> answerList) {
        this.answerList = answerList;
    }

    public char[] getStoreData() {
        return storeData;
    }

    public void setStoreData(char[] storeData) {
        this.storeData = storeData;
    }

    @Override
    public String toString() {
        return "UserMessage{" +
                "type='" + type + '\'' +
                ", user=" + user +
                ", question=" + question +
                ", testPaper=" + testPaper +
                '}';
    }
}
